﻿using ModernUILogViewer.Elements.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Markup;

namespace ModernUILogViewer.Elements
{
    [Obsolete("Use NotifierPanelHelper instead")]
    class NotifierGrid : Grid
    {
        public NotifierGrid()
        {            
            this.Loaded += NotifierGrid_Loaded;
        }

        public static readonly DependencyProperty PanelProperty =
            DependencyProperty.RegisterAttached("Panel",
            typeof(Panel), typeof(NotifierGrid));

        public Panel Panel
        {
            get { return (Panel)GetValue(PanelProperty); }
            set { SetValue(PanelProperty, value); }
        }

        void NotifierGrid_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            IList<Type> list = new List<Type> { typeof(TextBox), typeof(CheckBox) };
            Panel container = Panel ?? this;

            //HelperElementsNotifier.AttachTextBoxNotifier(container, ChildrenChanged);
            //HelperElementsNotifier.AttachCheckBoxNotifier(container, ChildrenChanged);
            //HelperElementsNotifier.AttachComboBoxNotifier(container, ChildrenChanged);
        }

        public event EventHandler ChildrenChanged;
    }
}
